﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GeneralServices.PatternCommand
{
    /// <summary>
    /// 
    /// </summary>
    public abstract class AbstractCommand
    {
        #region Attributs

        #endregion

        #region Properties
        /// <summary>
        /// 
        /// </summary>
        public AbstractCommandArgs Arguments
        {
            get;
            private set;
        }

        /// <summary>
        /// 
        /// </summary>
        public IReceiver Receiver
        {
            get;
            private set;
        }
        #endregion

        #region Constructeur
        /// <summary>
        /// 
        /// </summary>
        /// <param name="args"></param>
        public AbstractCommand(IReceiver receiver,  AbstractCommandArgs args)
        {
            Receiver = receiver;
            Arguments = args;
        }
        #endregion

        #region Méthodes
        /// <summary>
        /// 
        /// </summary>
        public abstract void Execute();

        /// <summary>
        /// 
        /// </summary>
        public abstract void UnExecute();

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public abstract AbstractCommand Undo();
        #endregion
    }
}
